import 'package:flutter_test/flutter_test.dart';
import 'package:ali_face_plugin/ali_face_plugin.dart';
import 'package:ali_face_plugin/ali_face_plugin_platform_interface.dart';
import 'package:ali_face_plugin/ali_face_plugin_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockAliFacePluginPlatform
    with MockPlatformInterfaceMixin
    implements AliFacePluginPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');

  @override
  Future<void> faceInit() {
    // TODO: implement faceInit
    throw UnimplementedError();
  }

  @override
  Future<String?> getMetainfo() {
    // TODO: implement getMetainfo
    throw UnimplementedError();
  }

  @override
  Future startVerify(String token) {
    // TODO: implement startVerify
    throw UnimplementedError();
  }
}

void main() {
  final AliFacePluginPlatform initialPlatform = AliFacePluginPlatform.instance;

  test('$MethodChannelAliFacePlugin is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelAliFacePlugin>());
  });

  test('getPlatformVersion', () async {
    AliFacePlugin aliFacePlugin = AliFacePlugin();
    MockAliFacePluginPlatform fakePlatform = MockAliFacePluginPlatform();
    AliFacePluginPlatform.instance = fakePlatform;

    expect(await aliFacePlugin.getPlatformVersion(), '42');
  });
}
